home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pasclern.zip
/
LOOPIF.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-04-01
|
550b
|
21 lines
PROGRAM loops_and_ifs;
VAR count,index : INTEGER;
BEGIN (* Main program *)
FOR count := 1 TO 10 DO
BEGIN (* Main loop *)
IF count < 6 THEN WRITELN('The loop counter is up to ',count:4);
IF count = 8 THEN
BEGIN
FOR index := 8 TO 12 DO
BEGIN (* Internal loop *)
WRITE('The internal loop index is ',index:4);
WRITE(' and the main count is ',count:4);
WRITELN;
END; (* Internal loop *)
END; (* If count = 8 condition *)
END; (* Main loop *)
END. (* Main program *)